package vn.edu.saigontech.ncms.model.result;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import vn.edu.saigontech.ncms.model.BaseEntity;
import vn.edu.saigontech.ncms.model.info.OfferingMember;

@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "test_type", discriminatorType = DiscriminatorType.STRING)
@Table(name = "ncms_test")
@SuppressWarnings("serial")
public abstract class AbstractTest extends BaseEntity {

	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "offering_member_id")
	protected OfferingMember offeringMember;

	@Column(name = "listening")
	protected Double listening;

	@Column(name = "speaking")
	protected Double speaking;

	@Column(name = "grammar")
	protected Double grammar;

	@Column(name = "reading")
	protected Double reading;

	@Column(name = "writing")
	protected Double writing;

	@Column(name = "pronunciation")
	private Double pronunciation;

	@Column(name = "comment", length = 4000)
	protected String comment;

	public OfferingMember getOfferingMember() {
		return offeringMember;
	}

	public void setOfferingMember(OfferingMember offeringMember) {
		this.offeringMember = offeringMember;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Double getListening() {
		return listening;
	}

	public void setListening(Double listening) {
		this.listening = listening;
	}

	public Double getReading() {
		return reading;
	}

	public void setReading(Double reading) {
		this.reading = reading;
	}

	public Double getSpeaking() {
		return speaking;
	}

	public void setSpeaking(Double speaking) {
		this.speaking = speaking;
	}

	public Double getWriting() {
		return writing;
	}

	public void setWriting(Double writing) {
		this.writing = writing;
	}

	public Double getGrammar() {
		return grammar;
	}

	public void setGrammar(Double grammar) {
		this.grammar = grammar;
	}

	public Double getPronunciation() {
		return pronunciation;
	}

	public void setPronunciation(Double pronunciation) {
		this.pronunciation = pronunciation;
	}
}